Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ElasticsearchIAE and ElasticsearchISE #10862

Merged
merged 2 commits into from
Apr 29, 2015
Merged

Conversation

s1monw
Copy link
Contributor

@s1monw s1monw commented Apr 28, 2015

This commit removes ElasticsearchIAE and ElasticsearchISE in favor of
the JDKs IAE and ISE.

Closes #10794

@s1monw s1monw added the review label Apr 28, 2015
@rmuir
Copy link
Contributor

rmuir commented Apr 28, 2015

+1

would be nice in the future to nuke lines of 'import java.lang.IllegalArgumentException;' and 'import java.lang.IllegalStateException;' too. But there are probably unnecessary imports in other places as well.

In some cases (e.g. IndexMetaData), there are throws clauses for these exceptions, which is a bit wierd too and something to revisit. I think it confuses lots of IDEs into generating separate catch blocks (we saw this forever from users list in lucene), and @throws is a better solution to declare what runtimeexceptions might happen.

@kimchy
Copy link
Member

kimchy commented Apr 28, 2015

LGTM, +1 to @rmuir suggestions

@jpountz
Copy link
Contributor

jpountz commented Apr 28, 2015

Huge +1 too. Nuking the java.lang imports should be easy to automate.

@s1monw s1monw force-pushed the issues/10794 branch 2 times, most recently from 4c21165 to e34db4d Compare April 29, 2015 08:42
This commit removes ElasticsearchIAE and ElasticsearchISE in favor of
the JDKs IAE and ISE.

Closes elastic#10794
This commit removes unused thorws statements when RuntimeExceptions are
mentioned in the throws statement. It also removes obsolete import statements
for java.lang.IllegalArgumentException and java.lang.IllegalStateException
@s1monw s1monw merged commit b4efb6c into elastic:master Apr 29, 2015
@s1monw s1monw removed the review label Apr 29, 2015
@lcawl lcawl added :Core/Infra/Core Core issues without another label and removed :Exceptions labels Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Core Core issues without another label >enhancement v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove ElasticsearchIllegalArgumentException and ElasticsearchIllegalStateException in favor of the JDK one
6 participants